<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		*{
			padding: 0px;
			margin: 0px;
		}
		#box1,#box2{
			width: 200px;
			height: 200px;
			position: absolute;
			top: 0px;
			left: 0px;
		}
		#box1{
			background: red url() 0 0 no-repeat;
		}
		#box2{
			background: yellow url() 0 0 no-repeat;
		}
		#p{
			width: 50px;
			height: 50px;
			background: blue url() 0 0 no-repeat;
		}


	</style>
	<script>
		
		window.onload = function () {

			// console.log(top)
			
			box1 = document.getElementById('box1');

			box1.onclick= function (argument) {
				// body...
			}

			box1.onmouseout= function () {
				// body...
			}

			box1.onmouseover =function () {
				
				h = Math.round(Math.random()*600);
				w = Math.round(Math.random()*1000);

				box1.style.top= h+'px';
				box1.style.left= w+'px';
			}
			

		}
	</script>
</head>
<body>
	<div id="box1">
	</div>
</body>
</html>